import java.util.Objects;
public class Seat {
    private int row;
    private int col;
    private boolean Occupied;
    private String ticketId;
    public Seat(int row,int col) {
        this.row = row;
        this.col=col;
        this.Occupied = false;
        this.ticketId=null;
    }
    public int getRow() {
        return row;
    }
    public int getCol(){
        return col;
    }
    public boolean isOccupied() {
        return Occupied;
    }
    public String getTicketId(){
        return ticketId;
    }
    public void setTicketId(String ticketId){
        this.ticketId=ticketId;
    }
    public void setOccupied(boolean Occupied){
        this.Occupied=Occupied;
    }
    public void occupy() {
        Occupied = false;
    }
    public void release() {
        Occupied= true;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Seat seat = (Seat) o;
        return row==seat.row&&col==seat.col;
    }
    @Override
    public int hashCode() {
        return Objects.hash(row,col);
    }
}

